<?php
/**
 *@author Connor <caokang@foxmail.com>
 *@todo
 *@link www.zeevin.com
 */


?>
<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/columns.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/form_verification.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquerydoubleselectmin.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.cookie.js"></script>
<div class="header">
      <div class="warpper">
            <div class="left"> <a href="#" title="之嗅交友站"><img src="images/small_logo.jpg" width="120" height="39" alt="之嗅交友站" class="logo"/></a> 
            </div>
            <div class="regist">
                  <ul>
                        <li><a href="javascript:void(0)" title="注册">注册</a></li>
                        <li class="login"><a href="javascript:void(0)" title="登陆">登陆</a> </li>
                  </ul>
                  <div class="login_in">
                        <form action="" method="post">
                              <div class="text"> <span>
                                    <label>账号</label>
                                    <input type="text" name="user_name" class="user_name"/>
                                    </span> <span>
                                    <label>密码</label>
                                    <input type="password" name="user_pass" class="user_pass"/>
                                    </span> </div>
                              <div class="action"> <span>
                                    <input type="button" name="submit" class="submit" value="登陆"/>
                                    </span><span>
                                    <input type="checkbox" checked="checked" class="checkbox"/>
                                    </span> <span><a href="#" title="一个月内免登陆">一个月内免登陆</a><a href="#" title="忘记密码？">忘记密码?</a></span> </div>
                        </form>
                  </div>
            </div>
      </div>
</div>
<!--main-->
<?php 
$form = $this->beginWidget('CActiveForm', array(
    'id'=>'user-regist',
    'enableAjaxValidation'=>true,
    'enableClientValidation'=>true,
    'focus'=>array($user,'email'),
    'clientOptions'=>array(
    	'validateOnChange'=>true,
    	'validateOnSubmit'=>true,
      'errorMessageCssClass'=>'input_error'
    	)
));
?>

<div class="warpper">
      <div class="container">
            <div class="register">
                  <h1 class="tit">会员注册页</h1>
                  <div class="register_box">
                        <div class="base_infor">
                              <div class="base_infor_top">
                                    <div class="left">
                                           <div class="nick">
                                                <label>邮&nbsp;&nbsp;&nbsp;&nbsp;箱：</label>
                                                <?php echo $form->textField($user,'email',array(),false);?>
                                                <p class="color900"><?php echo $form->error($user,'email');?></p>
                                          </div>
                                          <div class="nick">
                                                <label>密&nbsp;&nbsp;&nbsp;&nbsp;码：</label>
                                                <?php echo $form->textField($user,'password');?>
                                                <p class="color900"><?php echo $form->error($user,'password');?></p>
                                          </div>
                                          
                                           <div class="nick">
                                                <label>昵&nbsp;&nbsp;&nbsp;&nbsp;称：</label>
                                                <?php echo $form->textField($user,'nickname');?>
                                                <p class="color900"><?php echo $form->error($user,'nickname');?></p>
                                          </div>
                                           <div class="domain">
                                                <label>域&nbsp;&nbsp;&nbsp;&nbsp;名：</label>
                                                <span>http://zcou.com/</span>
                                                <?php echo $form->textField($user,'subdomain');?>
                                                <p class="color900"><?php echo $form->error($user,'subdomain');?></p>
                                          </div>
                                    </div>
         
                              </div>
                              <div class="base_infor_bottom">
                                    <ul>
                                          <li><span class="left"><strong>性&nbsp;&nbsp;&nbsp;&nbsp;别：</strong></span>
                                                <?php echo $form->radioButton($user, 'sex',array('value'=>User::SEX_MALE,'class'=>'seclect_sex','checked'=>'checked'));?>
												<span class="left" style="margin-right:10px;">男</span>
												<?php echo $form->radioButton($user, 'sex',array('value'=>User::SEX_FEMAL,'class'=>'seclect_sex'));?>
												<span class="left">女</span></li>
                                          </li>
                                          <li><span class="left"><strong>择友性别：</strong></span>
                                                <?php echo $form->radioButton($setting, 'sex_tendency',array('value'=>User::SEX_MALE,'class'=>'seclect_sex'));?>
												<span class="left" style="margin-right:10px;">男</span>
												<?php echo $form->radioButton($setting, 'sex_tendency',array('value'=>User::SEX_FEMAL,'class'=>'seclect_sex'));?>
												<span class="left" style="margin-right:10px;">女</span>
                                                <?php echo $form->radioButton($setting, 'sex_tendency',array('value'=>User::SEX_NONE,'class'=>'seclect_sex','checked'=>'checked'));?>
                                                <span class="left">不限</span>
										  </li>
                                          <li><span class="left"><strong>生&nbsp;&nbsp;&nbsp;&nbsp;日：</strong></span>
                                          		<?php echo $form->textField($user,'birth',array('value'=>'1990-01-01','onfocus'=>"this.value=''",'class'=>"birthday"));?>
                                          		<?php echo $form->error($user,'birth');?>
                                          </li>
                                          <li><span class="left"><strong>择友年龄：</strong></span>
                                                <?php echo $form->dropDownList($setting, 'age_start', Utils::genAgeSelect());?>
                                                <span class="left" style="margin-right:10px;">~</span>
                                                <?php echo $form->dropDownList($setting, 'age_end', Utils::genAgeSelect());?>
                                                
                                          </li>
                                          <li><span class="left"><strong>城&nbsp;&nbsp;&nbsp;&nbsp;市：</strong></span>
                                                <?php echo $form->dropDownList($user,'province_id',array(),array('class'=>'selected_province','id'=>'own_p'))?>
												<?php echo $form->dropDownList($user, 'city_id', array(),array('class'=>'selected_city','id'=>'own_c','style'=>'width:80px;'))?>
                                          </li>
                                          <li><span class="left"><strong>择友城市：</strong></span>
                                                <?php echo $form->dropDownList($setting,'province_id',array(),array('class'=>'province','id'=>'tendency_p'))?>
												<?php echo $form->dropDownList($setting, 'citys_tendency', array(),array('class'=>'city','id'=>'tendency_c','style'=>'width:80px;'))?>
                                          </li>
                                          <li><span class="left"><strong>学&nbsp;&nbsp;&nbsp;&nbsp;历：</strong></span>
                                                <?php echo $form->dropDownList($user,'edu',User::getDegree());?>
                                          </li>
                                          <li><span class="left"><strong>择友学历：</strong></span>
                                               <?php echo $form->dropDownList($setting,'edu_tendency',User::getDegree());?>
                                                <span class="left">以上</span> </li>
                                          <li><span class="left"><strong>收&nbsp;&nbsp;&nbsp;&nbsp;入：</strong></span>
                                                <?php echo $form->dropDownList($user,'income', User::getIncome())?>
                                          </li>
                                          <li><span class="left"><strong>择友收入：</strong></span>
                                                <?php echo $form->dropDownList($setting,'income_tendency', User::getIncome())?>
                                                <span class="left">以上</span> </li>
                                          <li><span class="left"><strong>身&nbsp;&nbsp;&nbsp;&nbsp;高：</strong></span>
                                                <?php echo $form->dropDownList($user, 'height', array_combine(range(130, 210),range(130, 210)));?><span class="left">cm</span> 
                                          </li>
                                          <li><span class="left"><strong>择友身高：</strong></span>
                                               <?php echo $form->dropDownList($setting, 'height_start', Utils::genHeightSelect());?>
                                                <span class="left" style="margin-right:10px;">~</span>
                                               <?php echo $form->dropDownList($setting, 'height_end', Utils::genHeightSelect());?>
                                          </li>
                                    </ul>
                              </div>
                              <div class="base_infor_modify"><span onclick="$('#user-regist').submit();">保存</span></div>
                        </div>
                  </div>
            </div>
      </div>
</div> 
<?php $this->endWidget();?>
<script type="text/javascript">
$('#User_email').val($.cookie('tmp_email'));
$('#User_password').val($.cookie('tmp_password'));
// $.cookie('tmp_email','');
// $.cookie('tmp_password','');

</script>
